package old_go_learn

import "fmt"

type Person struct {
	name string
	sex  string
	age  int
}

type Student struct {
	Person //只有类型，没有名字，匿名字段，继承了Person的成员
	id     int
	addr   string
}

func (tmp Person) PrintInfo() {
	fmt.Printf("name=%s,sex=%s,age=%d\n", tmp.name, tmp.sex, tmp.age)
}
func (tmp Student) PrintInfo() {
	fmt.Println(tmp)
}

func main() {


	e:=[]interface{}{"foo",1,true,'c'}
	fmt.Println(e)
	fmt.Printf("%v",e)
	return

	d:=[]string{"foo","bar"}
	fmt.Println(d)
	return

	var c [2]string
	c[0] = "foo"
	c[1] = "bar"
	fmt.Println(c)
	return



	b:=61
	fmt.Println(1%60)
	fmt.Println(b/60%60)
	fmt.Println(b%60)

	return

	i:=0
	for i<3{
		i++
		fmt.Println(i)
	}

	var str,s2 string
	fmt.Scan(&str,&s2)
	fmt.Println(str,s2)

	a:=1
	p:=&a
	fmt.Println(&a)
	fmt.Println(*p)

	s := Student{Person{"mike", "男", 18}, 1, "安徽"}

	s.PrintInfo()

	s.Person.PrintInfo()

}
